//
//  SEGYouZanManager.m
//  SEGUhomeSommunityBuss
//
//  Created by 揭婧雯 on 2018/11/9.
//  Copyright © 2018年 刘山. All rights reserved.
//

#import "SEGYouZanManager.h"

@implementation SEGYouZanManager
/**
 * 有赞登录
 * @author Wendy
 */
- (void)requestYouZanLogin:(SEGNetworkReponse)finished
{
    NSString *urlString = [SEGServerManager serverUrlJoint:kClientRootURL,@"/",kCMS_api,@"/api/v4/yzLogin",nil];
    [SEGHTTPBusinessManager seg_requestWithMethod:GET URLString:urlString parameters:nil finished:^(BOOL isSuccessed, id result, NSString *codeType, NSString *errorMessage) {
        
        if (!isSuccessed) {
            finished(NO, result, codeType, errorMessage);
            return;
        }
        
        NSDictionary* dicData = [result valueForKey:@"data"];
        if ((!dicData) || (![dicData isKindOfClass:[NSDictionary class]])) {
            finished(NO, result, codeType, errorMessage);
            return;
        }
        
        finished(YES, result, codeType, errorMessage);
        
    }];
}

@end
